package org.test.client.ui.skinui.checkbox;

import javax.swing.UIManager;
import javax.swing.plaf.InsetsUIResource;

import org.test.client.ui.skinui.BEUIInstall;


public class CheckBoxAndRadioUI {
	
	public static void initUI(){

		//将样式 设置为 windows的样式
//		UIManager.put( "CheckBoxUI", "com.sun.java.swing.plaf.windows.WindowsCheckBoxUI");
		UIManager.put( "RadioButtonUI", MyRadioButtonUI.class.getName());

		UIManager.put("CheckBox.margin",new InsetsUIResource(4,3,4,3));
		UIManager.put("RadioButton.margin",new InsetsUIResource(4,3,4,3));//2, 2, 2, 2));
		
		UIManager.put("RadioButton.background",BEUIInstall.commonBackgroundColor);
		UIManager.put("CheckBox.background",BEUIInstall.commonBackgroundColor);
		
		UIManager.put("CheckBox.foreground",BEUIInstall.commonForegroundColor);
		UIManager.put("RadioButton.foreground",BEUIInstall.commonForegroundColor);
		
		UIManager.put("RadioButton.icon", new RadioButtonIcon());
		UIManager.put("CheckBox.icon", new CheckBoxIcon());

		//衬距设定
		UIManager.put("RadioButton.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
		UIManager.put("CheckBox.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
	}
}
